import {JSEncrypt} from 'js-encrypt'

const keys = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw/Y8ypOYa3jTaGcHFTnh\n" +
    "1nHnTwWBn8WzwkCKtCo+7shCPiJH6JooubYZ17dWFwkdOWLz0LglRn9FaK202TiV\n" +
    "dbU4YvkhQRUWrbUnpofnEguhGVQHL/288BB9mCe2v1ke/eCGBUX9L3dKrUDX0UvB\n" +
    "6nQYLciQKwMsKBVtYuF1xtgGerlEM7ipUFST3k1CqiXSg89gC08aEW25C6UOMP8m\n" +
    "vDyXHfn9oEXjp1Ou0Z37IJbzq9BzhFXO0OOqT9bNhQ4GahwmBDDqIi1CJR0QpiyO\n" +
    "ZTnSApgqlzZx5sP0PIhwFgk3HrtzaQE7uyz+0/aedOFRyXJQrQIC6SpcJ0GSHJ0o\n" +
    "2wIDAQAB";

export default {
    encrypt(data){
        const e = new JSEncrypt()
        e.setPrivateKey(keys)
        const p = e.encrypt(data)
        return p.replace(/\+/g,'-')
    }
}
